//
//  Fanqie.h
//  MeToo
//
//  Created by 俊松何 on 2018/10/9.
//  Copyright © 2018年 tianxie. All rights reserved.
//

#ifndef Fanqie_h
#define Fanqie_h


#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
#import <MediaPlayer/MediaPlayer.h>

#import "UIImage+Image.h"
#import "UIView+LBExtension.h"
#import "Masonry.h"
#import "MJRefresh.h"
#import "MJExtension.h"
#import <ReactiveObjC/ReactiveObjC.h>
#import "AFNetworking.h"
#import "KLCPopup.h"
#import <pop/POP.h>
#import <UIImageView+WebCache.h>
#import <UIButton+WebCache.h>
#import "IQKeyboardManager.h"
#import "InternationalControl.h"
#import "CZAdditions.h"
#import "MBProgressHUD+MJ.h"

#import "MTNavigationController.h"
#import "MTWebViewController.h"
#import "MTBaseViewController.h"
#import "MTBaseTableViewController.h"
#import "LTLib.h"
#import "LTSDKHelper.h"
#import "UINavigationItem+Margin.h"
#import "UINavigationBar+Awesome.h"
#import "LZNotificationWorkstation.h"
#import "NSErrorHelper.h"
#import "UIViewController+HUD.h"
#import "UIButton+LayoutEdgeInsets.h"

#import "LTAESTool.h"

#import "MTVerCodeApiManager.h"
#import "MTUserApiManager.h"
#import "MTWorksApiManager.h"
#import "MTLiveApiManager.h"
#import "MTWalletApiManager.h"
#import "BONSTimerQueue.h"

#import "LTThridKeyCfgManger.h"

#import "FORScrollViewEmptyAssistant.h"

#import "MTLiveContainerController.h"
#import "HLiveController.h"


typedef NS_ENUM(NSInteger, MTValidationCode) {
    MTValidationCodeRegister,            //注册验证
    MTValidationCodeSetWalletPassword,   //设置钱包密码设置
};


static NSString *passwordCrypkey = @"x2M89L6BkCBPljhN";
static NSString *passwordCrypInvterKey = @"dZKLZOCyqbeKME0o";

//颜色色值 0x
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

// 设置颜色RGB
#define RGB(r, g, b) [UIColor colorWithRed:((r) / 255.0) green:((g) / 255.0) blue:((b) / 255.0) alpha:1.0]
#define RGBAlpha(r, g, b, a) [UIColor colorWithRed:((r) / 255.0) green:((g) / 255.0) blue:((b) / 255.0) alpha:(a)]

#define MainViewBgColor          UIColorFromRGB(0xefeff4)
#define MainLineViewColor        UIColorFromRGB(0xd9d9d9)
#define  ViewBackColor [UIColor colorWithWhite:0 alpha:0.2]
//主字体颜色
#define TextColor [UIColor whiteColor]
// 链接显示颜色
#define LinkhighLightColor  UIColorFromRGB(0x576b95)
//灰色字体颜色
#define GraytextColor UIColorFromRGB(0xcccccc)
//轻0灰色字体颜色
#define LightGray0 RGB(102, 102, 102)
//轻1灰色字体颜色
#define LightGray1 RGB(136, 136, 136)
//轻2灰色字体颜色
#define LightGray2 RGB(153, 153, 153)
//轻3灰色字体颜色
#define LightGray3 RGB(178, 178, 178)

#define  mainColor           [UIColor colorWithRed:1 green:1 blue:1 alpha:1]

#define  mainTintColor      UIColorFromRGB(0x00ca9d)   //  RGB(152, 178, 65)




//userList
#define  User_SectionTitleColor         [UIColor lightGrayColor]
#define  User_NameColor                 [UIColor colorWithRed:0 green:0 blue:0 alpha:1]
#define  User_LineColor                   UIColorFromRGB(0xd9d9d9)
#define  UserCell_backGroudColor        [UIColor  whiteColor]
#define  User_sectionIndexColor         [UIColor lightGrayColor]




#define  lineViewColor       [UIColor colorWithRed:222.0/255.0 green:222.0/255.0 blue:222.0/255.0 alpha:0.2]

#define  navgationBarColor       [UIColor whiteColor]

#define  mainButtonColor    mainTintColor

///正常字体
#define HFont(font) [UIFont systemFontOfSize:font]

//APP主字体
#define MainFont(fontSize) [UIFont fontWithName:@"PingFang-SC" size:fontSize]


///粗体
#define HBFont(font) [UIFont boldSystemFontOfSize:font]

//蓝色
#define BlueColor RGB(38,166,154)
//绿色
#define GreenColor RGB(0, 193, 92)
//状态栏+导航栏
#define BarColor RGB(24, 24, 24)
// 全局色
#define CFBGlobalColor RGB(229, 229, 229)
//边框颜色
#define BorderColor RGB(222, 222, 222)
// 链接显示颜色
#define LinkhighLightColor  UIColorFromRGB(0x576b95)
// 链接高亮背景颜色
#define LinkActiveBackgroundColor RGB(199, 199, 197)
// 朋友圈广场灰色颜色
#define TimeGrayColor   UIColorFromRGB(0x939393)
#define TitleGrayColor  UIColorFromRGB(0x929292)

#define V_IMAGE(imgName) [UIImage imageNamed:imgName]


// View 圆角和加边框
#define ViewBorderRadius(View, Radius, Width, Color)\
\
[View.layer setCornerRadius:(Radius)];\
[View.layer setMasksToBounds:YES];\
[View.layer setBorderWidth:(Width)];\
[View.layer setBorderColor:[Color CGColor]]

// View 圆角
#define ViewRadius(View, Radius)\
\
[View.layer setCornerRadius:(Radius)];\
[View.layer setMasksToBounds:YES]

#ifdef DEBUG
#define DLog(format, ...) NSLog((@"\n[函数名:%s]" "\n[行号:%d]\n" format), __FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define DLog(...);
#endif

//字符串是否为空
#define kStringIsEmpty(str) ([str isKindOfClass:[NSNull class]] || str == nil || [str length] < 1 ? YES : NO )

#define NSLTLocalizedString(key, moment)   [InternationalControl string:key]

// 主window
#define kWindow         [UIApplication sharedApplication].delegate.window

/** class 转换为 string */
#define StringFromClass(Class) NSStringFromClass([Class class])

// block self 弱化 强化
#define kSelfWeak __weak typeof(self) weakSelf = self
#define kSelfStrong __strong __typeof__(self) strongSelf = weakSelf

// 屏幕宽 屏幕高
#define WIDTH [UIScreen mainScreen].bounds.size.width
#define HEIGHT [UIScreen mainScreen].bounds.size.height

//屏幕比例适配
#define RelativeValue(absoluteValue) ((WIDTH/375)*absoluteValue)

#define iSIPad ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)

// 3.是否为iOS7
#define iOS7 ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0)

#define iSiPhoneX ([UIScreen mainScreen].bounds.size.width == 375 && [UIScreen mainScreen].bounds.size.height == 812)

#define bottomBaroffset  (iSiPhoneX ? 34:0)

#define  defaultImgae        [UIImage imageNamed:@"brandDefaultHeadFrame"]

#define cachePath [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0]

#endif /* Fanqie_h */
